// JavaScript Document
define(function (require, exports, module) {
	var Form=require("Form");
	var AppendInputModule=require("AppendInputModule");

	var CurrentForm=function(selector,options){
		Form.call(this)
		this.element=$(selector).get(0);
		this.options=options;
	}
	CurrentForm.prototype=new Form();
	CurrentForm.prototype.init=function(){
		var self=this;
		this.element=$("#form").get(0);

		ht.loading.close();
	}
	CurrentForm.prototype.updateRuleNames=function(){
		Form.prototype.updateRuleNames.call(this);
		//设置验证规则
		this.ruleNames=Array();
		this.ruleNames[0]=lv0;
		this.bindFieldsPattern();
	}

	CurrentForm.prototype.formSubmit=function(event){
		try{
			//进度条
			ht.loading.open();
			if (this.validate() != true) {
				return false;
			}
			return true;
		}catch(e){
			console.log(e);
			//进度条
			ht.loading.close();
			return false;
		}

	}
	var page=new CurrentForm();
	$(document).ready(function(){
			page.init();
		}
	)
	module.exports = CurrentForm;
});